home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Applications / Musique / ays-t23d.lha / THX-Example Player-CIA.ASM < prev    next >
Assembly Source File  |  1998-04-11  |  2KB  |  68 lines

  1. ;-------------------T-----------T-----------------T---------T---------------
  2.  
  3. ;=============================================================================
  4. ;=============================================================================
  5. ;===================== t h x - s o u n d   s y s t e m =======================
  6. ;=============================================================================
  7. ;=================== r e p l a y e r - t e s t   c o d e =====================
  8. ;=============================================================================
  9. ;=============================================================================
  10. ;========================= v e r s i o n   2 . 3 d ===========================
  11. ;=============================================================================
  12. ;=============================================================================
  13.  
  14.     IncDIR    "ASM:System/THX-Tracker/"
  15.     Include    "THX-Tracker Offsets.I"
  16.  
  17.  
  18.     Section    Dexter\Abyss_rulez,Code
  19.  
  20. Start    movem.l    d1-d7/a0-a6,-(sp)
  21.  
  22. .InitCIA    lea    thxCIAInterrupt,a0
  23.     moveq    #0,d0
  24.     jsr    thxReplayer+thxInitCIA
  25.     tst    d0
  26.     bne.b    .thxInitFailed
  27.  
  28. .InitPlayer    sub.l    a0,a0    ;auto-allocate public (fast)
  29.     sub.l    a1,a1    ;auto-allocate chip
  30.     moveq    #0,d0    ;load waves from hd if possible
  31.     moveq    #0,d1
  32.     jsr    thxReplayer+thxInitPlayer
  33.     ;check d0=result normally here...
  34.  
  35. .InitModule    lea    thxMyModule,a0    ;module
  36.     jsr    thxReplayer+thxInitModule
  37.     ;check d0=result normally here...
  38.  
  39. .InitSubSong    moveq    #0,d0    ;Subsong #0 = Mainsong
  40.     moveq    #0,d1    ;Play immediately
  41.     jsr    thxReplayer+thxInitSubSong
  42.  
  43. .thxLetHimPlay    btst    #6,$bfe001    ;not so system-friendly, i know!
  44.     bne.b    .thxLetHimPlay
  45.  
  46. .StopSong    jsr    thxReplayer+thxStopSong
  47.  
  48. .KillPlayer    jsr    thxReplayer+thxKillPlayer    ;don't forget!
  49.  
  50. .RemoveCIA    jsr    thxReplayer+thxKillCIA    ;don't forget!
  51.  
  52. .thxInitFailed    movem.l    (sp)+,d1-d7/a0-a6
  53.     moveq    #0,d0
  54.     RTS
  55.  
  56. thxCIAInterrupt    move    #0,$dff180
  57.     jsr    thxReplayer+thxInterrupt
  58.     move    #$aaa,$dff180
  59.     RTS
  60.  
  61.     Section    Pink\Abyss_rulez,Data
  62.  
  63.  
  64. thxReplayer    IncBIN    THX-Replayer.BIN
  65. thxMyModule    IncBIN    THX.Hawkeye-Loader
  66. thxVisualBasic    IncDLL    vbrun300.dll
  67.  
  68.